




//
//  MBHouseDetailVCPush.m
//  房源、商铺、写字楼详情页
//
//  Created by MB__Lee on 2018/5/24.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "MBHouseDetailVCPush.h"


@interface MBHouseDetailVCPush ()<UITableViewDelegate,UITableViewDataSource>

@end
static NSString *FisrtCellDetail_Identi = @"FisrtCellDetail";
static NSString *SecondDetail_Identi = @"SecondDetail";
static NSString *ThirdDetail_Identi = @"ThirdDetail";
static NSString *FourthDetail_Identi = @"FourthDetail";
static NSString *FifthCell_Identi = @"FifthCell";
static NSString *SixthCell_Identi = @"SixthCell";
static NSString *SeventhDetail_Identi = @"SeventhDetail";
static NSString *EigthCell_Identi = @"EigthCell";
static NSString *NithCell_Idneti = @"NithCell";
@implementation MBHouseDetailVCPush

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    __weak typeof(self) weakSelf = self;
    BaseTableCell *cell;
    if (indexPath.row == 0) {
        cell = [tableView dequeueReusableCellWithIdentifier:FisrtCellDetail_Identi];
    }else if (indexPath.row == 1){
        cell = [tableView dequeueReusableCellWithIdentifier:SecondDetail_Identi];
    }else if (indexPath.row == 2){
        cell  = [tableView dequeueReusableCellWithIdentifier:ThirdDetail_Identi];
        
        
        cell.thirdBlock = ^(MBFangDetailModel *model) {
            
            XQDeiltailVC *xq_vc = [[XQDeiltailVC alloc] init];
            xq_vc.model = model;
            
                        [weakSelf.navigationController pushViewController:xq_vc animated:YES];
//            [weakSelf presentViewController:xq_vc animated:YES completion:nil];
        };
    }else if (indexPath.row == 3){
        cell  =[tableView dequeueReusableCellWithIdentifier:FourthDetail_Identi];
    }else if (indexPath.row == 4){
        cell = [tableView dequeueReusableCellWithIdentifier:FifthCell_Identi];
    }else if (indexPath.row == 5){
        cell  = [tableView dequeueReusableCellWithIdentifier:SixthCell_Identi];
    }else if (indexPath.row == 6){
        cell = [tableView dequeueReusableCellWithIdentifier:SeventhDetail_Identi];
    }else if (indexPath.row == 7){
        cell = [tableView dequeueReusableCellWithIdentifier:EigthCell_Identi];
    }else if (indexPath.row == 8){
        cell = [tableView dequeueReusableCellWithIdentifier:NithCell_Idneti];
        cell.niBlock = ^(UIViewController *vc) {
            [weakSelf.navigationController pushViewController:vc animated:YES];
        };
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.model = self.model;
    
    cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
    
    return  cell;
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
